<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../8-concat.js"></script>
  //<script src="../9-slice.js"></script>
</head>
<body>
  <script>
    //数组合并
    //let arr = [1,2,3]
    // const result = arr.concat([4,5,6])
    // console.log(result);

    // const result = concat(arr,[4,5,6],7,8)
    // console.log(result);

    //数组切片
    // let arr = [1,2,3,4,5,6,7,8]
    // let result = arr.slice(1,6);
    // console.log(result)

    let arr = [1,2,3,4,5,6,7,8]
    let result = slice(arr,1,6);
    console.log(result)
  </script>
</body>
</html>